﻿using NodeBasedSkillEditor.ViewModel;
using System.Windows;
using System.Windows.Input;

namespace NodeBasedSkillEditor
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        VM_MainWindow _vm { get { return DataContext as VM_MainWindow; } }

        public MainWindow()
        {
            InitializeComponent();
        }

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            _vm.OnFocusFilterBox += FocusFilterBox;
        }

        void FocusFilterBox()
        {
            FilterBox.Focus();
            FilterBox.SelectAll();
        }
    }
}
